<?php

include('atributosComuns.class.php');
include('option.class.php');

/**
 * Description of select
 *
 * @author User
 */

class Select extends AtributosComuns{

    public $atributos = array_merge($this->atrCom,array('disabled'=>null,
                                'multiple'=>null,
                                'name'=>null,
                                'size'=>null,
                                'taindex'=>null,
                                'label'=>null));



   public function show ($options){

       $html = '';

       if($atributos['label']){
            $html .= '<label for="'.$this->atributos['id'].'">'.$this->atributos['label'].'</label>';}

       $html .= '<select';

       foreach($this->atributos as $chave => $valor){
            if($valor){
                $html .= ' '.$chave.'="'.$valor.'"';
            }
        }

       $html .= '>';

       foreach($options as $option){
           $html .= $option->show;
       }

       echo '</select>';

       return $html;
   }

}




?>
